package com.ruoyi.transaction.domain;

import java.math.BigDecimal;

import com.ruoyi.core.domain.StoreInfo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 订单商品对象 shop_order_item
 * 
 * @author swy
 * @date 2025-08-07
 */
public class ShopOrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private ShopOrder shopOrder;
    private StoreInfo storeInfo;
    private Sku sku;
    private Spu spu;

    public Spu getSpu() { return spu; }
    public void setSpu(Spu spu) { this.spu = spu; }
    public Sku getSku() {
        return sku;
    }

    public void setSku(Sku sku) {
        this.sku = sku;
    }
    public ShopOrder getShopOrder() { return shopOrder; }
    public void setShopOrder(ShopOrder shopOrder) { this.shopOrder = shopOrder; }


    public StoreInfo getStoreInfo() { return storeInfo; }
    public void setStoreInfo(StoreInfo storeInfo) { this.storeInfo = storeInfo; }
    /** 订单项ID，主键自增 */
    private Integer id;

    /** 订单ID（关联 shop_order） */
    @Excel(name = "订单ID", readConverterExp = "关=联,s=hop_order")
    private Integer orderId;

    /** 门店ID（下单门店） */
    @Excel(name = "门店ID", readConverterExp = "下=单门店")
    private Integer storeId;

    /** 商品SKU ID */
    @Excel(name = "商品SKU ID")
    private Integer skuId;

    /** 商品名称快照（下单时的商品名称） */
    @Excel(name = "商品名称快照", readConverterExp = "下=单时的商品名称")
    private String productName;

    /** 规格信息快照，如颜色、容量等 */
    @Excel(name = "规格信息快照，如颜色、容量等")
    private String specInfo;

    /** 下单时商品单价 */
    @Excel(name = "下单时商品单价")
    private BigDecimal price;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Integer quantity;

    /** 逻辑删除（0未删除，1已删除） */
    private String delFlag;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setOrderId(Integer orderId) 
    {
        this.orderId = orderId;
    }

    public Integer getOrderId() 
    {
        return orderId;
    }

    public void setStoreId(Integer storeId) 
    {
        this.storeId = storeId;
    }

    public Integer getStoreId() 
    {
        return storeId;
    }

    public void setSkuId(Integer skuId) 
    {
        this.skuId = skuId;
    }

    public Integer getSkuId() 
    {
        return skuId;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setSpecInfo(String specInfo) 
    {
        this.specInfo = specInfo;
    }

    public String getSpecInfo() 
    {
        return specInfo;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setQuantity(Integer quantity) 
    {
        this.quantity = quantity;
    }

    public Integer getQuantity() 
    {
        return quantity;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("storeId", getStoreId())
            .append("skuId", getSkuId())
            .append("productName", getProductName())
            .append("specInfo", getSpecInfo())
            .append("price", getPrice())
            .append("quantity", getQuantity())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .toString();
    }
}
